//This class is called when we don't have the ball possesion

/*TODO: If a player is out of the game, adjust
 * 		Adjust calcluation depending on playing side
 *		Contract Net Protocol 
 * 			Direct task assigment
 * 			Accept/Reject task assigment
 * 			Broadcasting task
 * 			Bid on task
 * 			Award bid winner
 * 		Implement communication protocol
 * 		Report on task results
 * 		Search for ball module
 * 		Go to position(x,y)
 * 		absTurn
 * 		absTurnNeck (0 at bottom side)
 * 		Consider stamina
 * 		Conexion con servidor
 * 
 * Preguntas:
 * 		Capacidad de audio
 * 		Ver la bola
 * 
 */

/*include java.lang.Math 

class Defense {
		public static void main( String [] args )
		{
		    int num = getNumber()
		    
		    switch (num)
		    {
				//If we are playing with our 11 players
					case 1: 
						//Goalie;
						//Lisiten to message of Defender Leader
						break;
					case 2: 
						//Defense Leader
						//If ball position is not known, tell everyone to look for ball
						//If ball position is known, start the Contract Net Protocol
							//Ask player 3 to defend left opponent
							//Ask player 4 to defend right opponent
							//Ask player 5 to go get ball
							//Broadcast task if one of the above didn't accept
							//Broadcast tasks for midfielders
							//Go to block one side of goalie and tell goalie to go to other side
						//Broadcast position of ball
					case 3: case 4: case 5:
						//Defenders
						//Listen to message of Defender Leader
						//Do task, if no new message, keep doing same task
						//Report if task is complete or if it was failed
		}
		void taskDefendOpponent(int oppenentPosX, int opponentPosY, int ballPosX, int ballPosY)
		{
			//Stand between the ball and the opponent so passes can't be made
			
			//Calculate to be at 10% from the opponent to the ball
			int xPos = opponentPosX + 0.1*(opponetPosX - ballPosX);
			int yPos = opponentPosY + 0.1*(opponetPosY - ballPosY);
			//Make verification so it doesn't stand closer than the limit by rule
			
			//Go to the position calculated
			goToPos(xPos,yPos);
			
			//Turn the neck to face the opponent
			absTurnNeck(Math.atan2(opponetPosY - ballPosY,opponetPosX - ballPosX)+180);
		}
		
		void goToPos(int destPosX, int destPosY, int speed)
		{
			absTurn(Math.atan2(destPosY - getY(),destPosX - detX));
			dash(speed);
		}
			
	}
}
*/